package com.qf.controller;

import com.qf.po.Orderinfo;
import com.qf.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class OrderinfoController {
    @Autowired
    private OrderService orderService;
    @RequestMapping(value = "/order",method = RequestMethod.GET)
    public Orderinfo save(Orderinfo orderinfo){
        Orderinfo add = orderService.add(orderinfo);
        if (!ObjectUtils.isEmpty(add)){
                return add;
        }
        return null;
    }
}
